<!DOCTYPE html>
<html>
<head>
<title>菜单管理</title>
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="Author" content="larry" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
<link rel="stylesheet" href="../../statics/common/cascader/cascader/cascader.css" media="all">
<link rel="stylesheet" type="text/css" href="../../statics/common/layui/css/layui.css" media="all">
<link rel="stylesheet" type="text/css" href="../../statics/common/layui/css/autocomplete.css">
<link rel="stylesheet" type="text/css" href="../../statics/common/layui/css/soulTable.css">
<link rel="stylesheet" type="text/css" href="../../statics/plugins/ztree/css/metroStyle/metroStyle.css">
<link rel="stylesheet" type="text/css" href="../../statics/css/common.css">
<link rel="stylesheet" type="text/css" href="../../statics/css/font-awesome-4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="../../statics/css/list-search-table.css">
<!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/layui-soul-table/docs/soulTable.css" media="all"/>-->
<script type="text/javascript" src="../../statics/plugins/jquery.min.js"></script>
<script type="text/javascript" src="../../statics/common/lib/vue.min.js"></script>
<script type="text/javascript" src="../../statics/plugins/ztree/jquery.ztree.all.min.js"></script>
<script type="text/javascript" src="../../statics/common/layui/layui.all.js"></script>
<script type="text/javascript" src="../../statics/common/js/axios.min.js"></script>
<script type="text/javascript" src="../../statics/common/js/xm-select.js"></script>
<script type="text/javascript" src="../../statics/js/common.js"></script>
<script type="text/javascript" src="../../statics/js/upload.js"></script>
<script type="text/javascript" src="../../statics/common/step/steps.js"></script>
<link rel="stylesheet" href="../../statics/css/jxcPublicAll.css"  media="all">
<link href="../../statics/common/photoviewer/dist/photoviewer.css" rel="stylesheet">
<link rel="stylesheet" href="../../statics/common/step/steps.css">
<!--<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/cropperjs/1.5.7/cropper.css" media="all">-->
<link rel="stylesheet" href="../../statics/js/modules/cropper/cropper.css" media="all">
<link rel="stylesheet" type="text/css" href="../../statics/css/viewer.min.css">
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/cropperjs/1.5.7/cropper.min.js"></script>-->
<script src="../../statics/js/modules/cropper/cropper.min.js"></script>
<script src="../../statics/common/photoviewer/dist/photoviewer.js"></script>
<script src="../../statics/common/layui/autocomplete.js"></script>
<script  src="../../statics/js/modules/viewer/viewer.min.js"></script>
<script src="../../statics/common/print-js/print.min.js"></script>
<link rel="stylesheet" type="text/css" href="../../statics/common/print-js/print.min.css">
<script type="text/javascript" src="../../statics/common/xmselect/xm-select.js"></script>
<script type="text/javascript" src="../../statics/js/searchview.js"></script>
<script type="text/javascript" src="../../statics/js/tableedit.js"></script>

<!--<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.0&type=webgl&ak=eo4XeZhRKHsQ0NOe6u6NkKscmRsk416B"></script>-->

<!-- 引入组件库 -->
<link rel="stylesheet" type="text/css" href="../../statics/css/index.css">






<link rel="stylesheet" href="../../statics/css/bootstrap.min.css">
<link rel="stylesheet" href="../../statics/css/bootstrap-table.min.css">
<link rel="stylesheet" href="../../statics/plugins/treegrid/jquery.treegrid.css">
<script src="../../statics/plugins/bootstrap-table.min.js"></script>
<script src="../../statics/plugins/treegrid/jquery.treegrid.min.js"></script>
<script src="../../statics/plugins/treegrid/jquery.treegrid.bootstrap3.js"></script>
<script src="../../statics/plugins/treegrid/jquery.treegrid.extension.js"></script>
<script src="../../statics/plugins/treegrid/tree.table.js"></script>
</head>
<body class="ren-body">
<div id="rrapp" v-cloak>
	<div class="list-search-title-box">
		<form class="layui-form">
			<div style="display:flex;width: 100%;">
				<div class="layui-form-item layui-row" style="width: 100%;">
					<div class="list-search-form-button" style="width: 100%;">
						<mperm v-m-perm="['sys:menu:save']">
								<a class="layui-btn search-btn" @click="add">新增</a>
						</mperm>
						<mperm v-m-perm="['sys:menu:update']">
								<a class="layui-btn reset-btn" @click="update">修改</a>
						</mperm>
						<mperm v-m-perm="['sys:menu:delete']">
								<a class="layui-btn reset-btn" @click="del">删除</a>
						</mperm>
					</div>
				</div>
			</div>
		</form>
	</div>

	<table id="menuTable" data-mobile-responsive="true" data-click-to-select="true">
		<thead>
		<tr>
			<th data-field="selectItem" data-checkbox="true"></th>
		</tr>
		</thead>
	</table>

	<!-- 表单 -->
	<form v-show="showForm" class="layui-form ren-form" id="editForm">
		<div class="layui-form-item">
			<label class="layui-form-label">类型</label>
			<div class="layui-input-block">
				<input type="radio" name="type" v-model="menu.type" lay-filter="type" value="0" title="目录">
				<input type="radio" name="type" v-model="menu.type" lay-filter="type" value="1" title="菜单">
				<input type="radio" name="type" v-model="menu.type" lay-filter="type" value="2" title="按钮">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label" style="width: auto;">菜单名称</label>
			<div class="layui-input-block">
				<input type="text" lay-verify="required" v-model="menu.name" autocomplete="off" placeholder="菜单名称或按钮名称" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label" style="width: auto;">上级菜单</label>
			<div class="layui-input-block">
				<input type="text" lay-verify="required" style="cursor:pointer;" v-model="menu.parentName" @click="menuTree" readonly="readonly" placeholder="一级菜单" class="layui-input">
			</div>
		</div>
		<div v-if="menu.type == 1" class="layui-form-item">
			<label class="layui-form-label" style="width: auto;">菜单URL</label>
			<div class="layui-input-block">
				<input type="text" lay-verify="required" v-model="menu.url" autocomplete="off" placeholder="菜单URL" class="layui-input">
			</div>
		</div>
		<div v-if="menu.type == 1 || menu.type == 2" class="layui-form-item">
			<label class="layui-form-label" style="width: auto;">授权标识</label>
			<div class="layui-input-block">
				<input type="text" v-model="menu.perms" autocomplete="off" placeholder="授权标识" class="layui-input">
			</div>
		</div>
		<div v-if="menu.type != 2" class="layui-form-item">
			<label class="layui-form-label" style="width: auto;">排序号</label>
			<div class="layui-input-block">
				<input type="text" lay-verify="required" v-model="menu.orderNum" autocomplete="off" placeholder="排序号" class="layui-input">
			</div>
		</div>
		<div v-if="menu.type != 2" class="layui-form-item">
			<label class="layui-form-label" style="width: auto;">图标</label>
			<div class="layui-input-block">
				<input type="text" lay-verify="required" v-model="menu.icon" autocomplete="off" placeholder="图标" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-input-block">
				<button class="layui-btn" lay-submit lay-filter="saveOrUpdate">确定</button>
			</div>
		</div>
	</form>

</div>

<!-- 选择菜单 -->
<div id="menuLayer" style="display: none;padding:10px;">
	<ul id="menuTree" class="ztree"></ul>
</div>

<script src="../../statics/js/modules/sys/menu.js?_${.now?long}"></script>
</body>
</html>